<%@ page language="java" contentType="text/html;charset=UTF-8" %>
<%@ include file="/static/include/taglib.jsp" %>
<!DOCTYPE html >
<html>
<head>
    <meta name="viewport" content="width=device-width"/>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    <title>执法考核管理--执法考核项编辑</title>
    <link href="${ctxStatic}/layui/css/layui.css" rel="stylesheet"/>
    <link href="${ctxStatic}/css/kpiuitanchu.css" rel="stylesheet"/>
    <script src="${ctxStatic}/js/jquery-1.8.3.min.js?v=2.0" type="text/javascript"></script>
    <script src="${ctxStatic}/layui/layui.all.js" type="text/javascript"></script>
    <style>
        .selftable tbody td {
            height: 28px;
            color: #ffffff
        }

        .selftable tbody td input {
            text-align: center
        }

        .layui-table-edit {
            position: static;
        }

        .selftable .layui-input, .layui-select, .layui-textarea {
            height: auto
        }

        .input_back {
            background: transparent;
        }

        .selftable .layui-textarea {
            margin-top: 0;
            background: transparent;
            border: 0;
            height: auto;
            line-height: 20px;
            resize: none
        }
    </style>
</head>
<body>
<div style="padding-left:10px">
    <form class="layui-form" id="formedit" name="formedit" action="create_templateindex" method="post"
          target="d41d8cd98f00b204e9800998ecf8427e">
        <iframe name="d41d8cd98f00b204e9800998ecf8427e" src="about:blank" style="display:none;"></iframe>
        <div class="indexcontent">
            <table cellspacing="0" cellpadding="0" border="0" class="layui-table" style="margin:0;">
                <col width="80px"></col>
                <col width="100px"></col>
                <col width="200px"></col>

                <col></col>

                <thead>
                <tr>
                    <th><input type="checkbox" name="" lay-skin="primary" lay-filter="allChoose"></th>
                    <th>内容</th>
                    <th>考核指标</th>

                    <th>评价标准</th>

                </tr>
                </thead>
            </table>

            <div class="selftable">
                <table cellspacing="0" cellpadding="0" border="0" class="layui-table" style="margin:0;" id="tableinput">
                    <col width="80px"></col>
                    <col width="100px"></col>
                    <col width="200px"></col>

                    <col></col>

                    <tbody>
                    <c:forEach var="item" items="${lst}">
                        <tr>
                            <c:if test="${item.ischecked==0 }">
                                <td><input type="checkbox" name="cb_${item.assindexid}" lay-skin="primary"></td>
                            </c:if>
                            <c:if test="${item.ischecked==1 }">
                                <td><input type="checkbox" name="cb_${item.assindexid}" checked="checked"
                                           lay-skin="primary"></td>
                            </c:if>

                            <c:if test="${item.rowspan!=0 }">
                                <td rowspan="${item.rowspan}" style="vertical-align: middle" valign="middle"><textarea
                                        style="vertical-align: middle;border: 0px;height: 100%" name="uasscontent_${item.parentid}"
                                        class="layui-input layui-table-edit input_back"   readonly="readonly"
                                        >${item.uasscontent}</textarea></td>
                            </c:if>
                            <td><input name="uassingredients_${item.assindexid}" readonly="readonly"
                                       class="layui-input layui-table-edit input_back" type="text"
                                       value="${item.uassingredients}"></td>
                                <%--<td><input name="score_${item.assindexid}" readonly="readonly" class="layui-input layui-table-edit input_back" type="text" value="${item.score}"></td>--%>
                            <td>
                                <textarea class="layui-textarea" readonly="readonly"
                                          name="evaluationstandard_${item.assindexid}">${item.evaluationstandard}</textarea>
                                <!-- <input name="evaluationstandard_${item.assindexid}" readonly="readonly" class="layui-input layui-table-edit input_back" type="text" value="${item.evaluationstandard}"> -->
                            </td>
                            <td>
                                <input type="hidden" name="parentid_${item.assindexid}" value="${item.parentid}">
                            </td>
                        </tr>
                    </c:forEach>

                    </tbody>
                </table>
            </div>
        </div>

        <div style="margin:0 auto;margin-top: 10px;width:90%;color:#ffffff">
            <table style="width:100%">
                <tr>
                    <td style="width:70px;text-align: right"> 考评表名称：</td>
                    <td style="width:200px">
                        <input type="text" name="templatename" lay-verify="required" autocomplete="off"
                               class="layui-input" value="${ustempentity.templatename }">
                    </td>
                    <td style="text-align: right">考核期开始时间：</td>
                    <td style="width:120px">
                        <input type="text" id="begintime" name="begintime" lay-verify="required|date" autocomplete="off"
                               class="layui-input"
                               value="<fmt:formatDate value='${ustempentity.begintime}' pattern='yyyy-MM-dd'/>">
                    </td>
                    <td style="text-align: right">考核期结束时间：</td>
                    <td style="width:120px">
                        <input type="text" id="endtime" name="endtime" lay-verify="required|date" autocomplete="off"
                               class="layui-input"
                               value="<fmt:formatDate value='${ustempentity.endtime}' pattern='yyyy-MM-dd'/>">
                    </td>

                </tr>


                <tr>
                    <td style="width:70px;text-align: right">描述：</td>
                    <td colspan="3" style="height:50px">
                        <textarea class="layui-textarea" style="height:50px;min-height:50px" rows="2"
                                  name="templatedes">${ustempentity.templatedes }</textarea>
                    </td>
                    <td style="text-align: center" colspan="2">
                        <button class="button" lay-submit="" lay-filter="demo1" id="btnsave">保存模板</button>
                        <%--<input type="button" value="导出数据" class="button" style="margin-top:10px"  onclick="exportdata()"/>--%>
                        <%--<input type="button" value="导入数据" class="button" style="margin-top:10px"  onclick="inportdata()"/>--%>
                        <input type="button" value="关闭" class="button" style="margin-top:10px"
                               onclick="top.CloseOpenWindow()"/>
                    </td>
                </tr>
            </table>
        </div>
        <input type="hidden" value="${pagestring.keyword1}" name="parentids">
        <input type="hidden" value="${pagestring.keyword2}" name="assindexids">
        <input type="hidden" value="${templateid}" name="templateid">
    </form>

    <script>
        layui.use(['form', 'laydate'], function () {
            var form = layui.form;
            var laydate = layui.laydate;

            form.on('checkbox(allChoose)', function (data) {
                var child = $("#tableinput").find('tbody input[type="checkbox"]');
                child.each(function (index, item) {
                    item.checked = data.elem.checked;
                });
                form.render('checkbox');
            });
            laydate.render({
                elem: '#begintime'
            });
            laydate.render({
                elem: '#endtime'
            });
            form.render();

        });

        function CloseDialog(result, msg) {
            top.frames["iframe"].vWorkTemplate.addresult(result, msg);
        }

        function exportdata(){

        }

        function inportdata() {

        }
    </script>


</div>
</body>
</html>